#include "PCH.h"
#include "DepthStencilState.h"
using namespace DeviousRenderer;

DepthStencilViewConfig::DepthStencilViewConfig()
{

}

DepthStencilViewConfig::~DepthStencilViewConfig()
{

}


DepthStencilViewConfig::SetDefaults()
{
	// Set the state to the default configuration.  These are the D3D11 default
	// values as well.

	m_State.Flags = 0;
	m_State.Format = DXGI_FORMAT_UNKNOWN;
	m_State.ViewDimension = D3D11_DSV_DIMENSION_UNKNOWN;
}
//--------------------------------------------------------------------------------
void DepthStencilViewConfig::SetFormat( DXGI_FORMAT state )
{
	m_State.Format = state;
}
//--------------------------------------------------------------------------------
void DepthStencilViewConfig::SetViewDimensions( D3D11_DSV_DIMENSION state )
{
	m_State.ViewDimension = state;
}
//--------------------------------------------------------------------------------
void DepthStencilViewConfig::SetFlags( UINT state )
{
	m_State.Flags = state;
}
//--------------------------------------------------------------------------------
void DepthStencilViewConfig::SetTexture1D( D3D11_TEX1D_DSV state )
{
	m_State.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE1D;
	m_State.Texture1D = state;
}
//--------------------------------------------------------------------------------
void DepthStencilViewConfig::SetTexture1DArray( D3D11_TEX1D_ARRAY_DSV state )
{
	m_State.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE1DARRAY;
	m_State.Texture1DArray = state;
}
//--------------------------------------------------------------------------------
void DepthStencilViewConfig::SetTexture2D( D3D11_TEX2D_DSV state )
{
	m_State.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2D;
	m_State.Texture2D = state;
}
//--------------------------------------------------------------------------------
void DepthStencilViewConfig::SetTexture2DArray( D3D11_TEX2D_ARRAY_DSV state )
{
	m_State.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2DARRAY;
	m_State.Texture2DArray = state;
}
//--------------------------------------------------------------------------------
void DepthStencilViewConfig::SetTexture2DMS( D3D11_TEX2DMS_DSV state )
{
	m_State.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2DMS;
	m_State.Texture2DMS = state;
}
//--------------------------------------------------------------------------------
void DepthStencilViewConfig::SetTexture2DMSArray( D3D11_TEX2DMS_ARRAY_DSV state )
{
	m_State.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2DMSARRAY;
	m_State.Texture2DMSArray = state;
}
//--------------------------------------------------------------------------------
DepthStencilViewConfig& DepthStencilViewConfigDX11::GetDSVDesc()
{
	return( m_State );
}

DepthStencilState::DepthStencilState(ID3D11DepthStencilState* pState)
: m_pState(pState)
{

}

DepthStencilState::~DepthStencilState()
{

}